package TMS.src;

public class Gadget {
    static boolean check_user_card_illegal(String card_number){
        return !card_number.matches("^(000[1-9]|00[1-9]\\d|0[1-9]\\d{2}|[1-3]\\d{3}|4[0-4]\\d{2}|4500)(178[5-9]|179\\d|18[0-7]\\d|188[0-6])([1-2]\\d{3}|3000)$");
    }
    static boolean check_name_illegal(String name){
        return !name.matches("^[A-Za-z][A-Za-z_]{3,15}$");
    }
    static boolean check_password_illegal(String password){
        return !password.matches("^(?=.*\\d)(?=.*[a-zA-Z])(?=.*[@_%$])[a-zA-Z0-9@_%$]{8,16}$");
    }
}
